package com.hzlemone.form.model.enums;


/**
 * @ClassName PublicStatusEnum.java
 * @Description 表单项类型
 * @author Francis.LW
 * @date 2017年7月24日
 **/

public enum FormItemTypeEnum {

	INPUT("0", "单行文本框"), TEXTAREA("1", "多行文本框"),
	RADIO("2","单选框"),CHECK("3","复选框"),Select("4","下拉框");

	private String code;
 
	private String message;

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	private FormItemTypeEnum(String code, String message) {
		this.code = code;
		this.message = message;
	}

	public static String getMessage(String code) {
		for (FormItemTypeEnum responseStatus : FormItemTypeEnum.values()) {
			if (responseStatus.code.equals(code)) {
				return responseStatus.message;
			}
		}
		return null;
	}
}
